﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SimpleStudent
{
    class Program
    {
        class Student
        {
            private string name;
            private int? age;

            public Student(string name, int? age)
            {
                this.name = name;
                this.age = age;
            }

            public string Name
            {
                get
                {
                    return name;
                }
            }

            public int? Age
            {
                get
                {
                    return age;
                }
            }

            public override string ToString()
            {
                if (age == null)
                {
                    return string.Format("The name of the person is {0}, but the age is not available.", this.name);
                }
                else
                {
                    return string.Format("The name of the person is {0}, and his age is {1}", this.name, this.age);
                }
            }

        }
        static void Main()
        {
            Student s1 = new Student("Andrey", 22);
            Student s2 = new Student("Momchil", null);
            Console.WriteLine(s1);
            Console.WriteLine(s2);
        }
    }
}
